<div class="hotsale border mb10">
 	<h3 class="border-b"><span>排行榜</span></h3>
    <div class="content">
        <ul class="rank-nav" id="rank-11">
            <li class="curr" id="one"><a><span>最新</span></a></li>
	        <li id="two"><a><span>热销</span></a></li>
        </ul>
        <ul class="rank-c clearfix" id="rank-one">
            <!--{foreach from=$widget_data.news item=goods name=fe_goods}-->
            <li {if $smarty.foreach.fe_goods.last}style="border:0;"{/if} class="clearfix">
            	<div class="rank_num clearfix">
					<b>{$smarty.foreach.fe_goods.iteration}</b>已售出{$goods.sales|default:0}件
                </div>
                <div class="pic border"><a target="_blank" href="{url route='goods/index' id=$goods.goods_id}">
                    <img width="60" height="60"  src="{$goods.default_image|url_format}" alt="{$goods.goods_name|escape}" title="{$goods.goods_name|escape}" /></a>
                </div>
		   	    <div class="desc">
                	<a target="_blank" href="{url route='goods/index' id=$goods.goods_id}">{$goods.goods_name|escape}</a>
                </div>
		   		<div class="price"><strong>{$goods.price|price_format}</strong></div>
            </li>
            <!--{/foreach}-->
       </ul>
       <ul class="rank-c clearfix" id="rank-two" style="display:none;">
            <!--{foreach from=$widget_data.hots item=goods name=fe_goods}-->
            <li {if $smarty.foreach.fe_goods.last}style="border:0;"{/if} class="clearfix">
            	<div class="rank_num clearfix">
					<b>{$smarty.foreach.fe_goods.iteration}</b>已售出{$goods.sales|default:0}件
                </div>
                <div class="pic border"><a target="_blank" href="{url route='goods/index' id=$goods.goods_id}">
                    <img width="60" height="60"  src="{$goods.default_image|url_format}" alt="{$goods.goods_name|escape}" title="{$goods.goods_name|escape}" /></a>
                </div>
		   	    <div class="desc">
                	<a target="_blank" href="{url route='goods/index' id=$goods.goods_id}">{$goods.goods_name|escape}</a>
                </div>
		   		<div class="price"><strong>{$goods.price|price_format}</strong></div>
            </li>
           <!--{/foreach}-->
      </ul>
  </div>
</div>
<script>
$(function(){
	$('.hotsale .content #one').hover(function(){
		$(this).parent().find('li').attr('class','');
		$(this).attr('class','curr');
					
		$('.hotsale .content').find('.rank-c').hide();
		$('.hotsale .content #rank-'+this.id).show();
	});
				
	$('.hotsale .content #two').hover(function(){
		$(this).parent().find('li').attr('class','');
		$(this).attr('class','curr');
					
		$('.hotsale .content').find('.rank-c').hide();
		$('.hotsale .content #rank-'+this.id).show();
	});
});
</script>